﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla;

namespace CslaHispano.EncapsulatedInvoke.Domain.Entities
{
    [Serializable()]
    public partial class ModuleEdit:BusinessBase<ModuleEdit>
    {
        #region Properties

        public static readonly PropertyInfo<string> ModuleIdProperty = RegisterProperty<string>(c => c.ModuleId);
        public string ModuleId
        {
            get { return GetProperty(ModuleIdProperty); }
            private set { SetProperty(ModuleIdProperty, value); }
        }
        public static readonly PropertyInfo<string> SystemIdProperty = RegisterProperty<string>(c => c.SystemId);
        public string SystemId
        {
            get { return GetProperty(SystemIdProperty); }
            set { SetProperty(SystemIdProperty, value); }
        }
        public static readonly PropertyInfo<string> CodeProperty = RegisterProperty<string>(c => c.Code);
        public string Code
        {
            get { return GetProperty(CodeProperty); }
            set { SetProperty(CodeProperty, value); }
        }
        public static readonly PropertyInfo<string> DescriptionProperty = RegisterProperty<string>(c => c.Description);
        public string Description
        {
            get { return GetProperty(DescriptionProperty); }
            set { SetProperty(DescriptionProperty, value); }
        }
        public static readonly PropertyInfo<Boolean> StatusProperty = RegisterProperty<Boolean>(c => c.Status);
        public Boolean Status
        {
            get { return GetProperty(StatusProperty); }
            set { SetProperty(StatusProperty, value); }
        }

        public static readonly PropertyInfo<ModuleOptions> OptionsProperty = RegisterProperty<ModuleOptions>(c => c.Options);
        public ModuleOptions Options
        {
            get { return GetProperty(OptionsProperty); }
            set { SetProperty(OptionsProperty, value); }
        }
        #endregion

        #region Factory Methods

        public static ModuleEdit NewModuleEdit()
        {
            return DataPortal.Create<ModuleEdit>();
        }

        public static ModuleEdit GetModuleEdit(string moduleId)
        {
            return DataPortal.Fetch<ModuleEdit>(moduleId);
        }

        public static void DeleteModuleEdit(string moduleId)
        {
          DataPortal.Delete<ModuleEdit>(moduleId);
        }

        public ModuleEdit()
        {
            MarkAsChild();
        }

        #endregion
    }
}
